<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>2350300097 万朗</title>
    <style>
        table {
            border-collapse: collapse;
            margin: 20px auto;
        }
        td {
            width: 40px;
            height: 40px;
            border: 1px solid #ccc;
        }
    </style>
</head>
<body>
<h2>8x8 随机颜色变换图像</h2>
<table>
    <%
        String[] colors = {"green", "cyan", "black", "red", "yellow", "pink"};
        java.util.Random rand = new java.util.Random();

        for (int i = 0; i < 8; i++) {
            out.print("<tr>");
            for (int j = 0; j < 8; j++) {
                String color = colors[rand.nextInt(colors.length)];
                out.print("<td style='background-color:" + color + "'></td>");
            }
            out.print("</tr>");
        }
    %>
</table>
</body>
</html>
